#include "stdafx.h"
#include "Box.h"

Box::Box(const Box& b)
	{
	*this = b;
	}

Box& Box::operator=(const Box& b) //Zuweisungsoperator
	{
	Shape::operator=(b);
	return *this;
	}

char Box::charAt(int i, int j)
	{
	char result = ' ';
	int maxI = getContour().columns-1;
	int maxJ = getContour().rows-1;
	if ((i==0 && j==0) || (i==0 && j==maxJ) || (i==maxI && j==0) || (i==maxI && j==maxJ))
		result = '+';
	else if (i==0 || i== maxI) result= '|';
	else if (j==0 || j== maxJ) result= '-';
	return result;
	}